﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Traversing - Filtering</title>
    <script src="script/jquery-1.3.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
        $("div").css("background", "#b4b0da")
            .filter(function(index) {
                return index == 1 || $(this).attr("id") == "fourth";
            })
            .css("border", "3px double red"); 
        });
    </script>
    
    <style type="text/css">
        div
        {
            width:113px;
            height:30px;
            margin:13px;
            border:dashed 1px #000;
            background-color:Gray;
        }
    </style>
</head>
<body>
    <div id="first"></div> 
    <div id="second"></div> 
    <div id="third"></div> 
    <div id="fourth"></div> 
    <div id="fifth"></div> 
    <div id="sixth"></div>
</body>
</html>
